package main

import (
	"basic-go/src/arrays"
	"fmt"
	"math/rand"
	"time"
)

func main() {

	rand.Seed(time.Now().UnixNano())

	count := 2000000

	arr := make([]int, count)

	for i := 0; i < count; i++ {
		arr[i] = rand.Intn(1000000)
	}

	//fmt.Println(arr)

	start := time.Now().Unix()

	// 快速排序
	arrays.QuickSort(arr)

	end := time.Now().Unix()

	fmt.Printf("耗时: %ds\n", end-start)

	// 排序后结果
	//fmt.Println(arr)
}
